import request from '@/utils/request'

//获取推荐歌单
export function getPersonalized(data: any) {
  return request.get('/personalized', data)
}
//获取推荐音乐
export function getPersonalizedNewsong(data: any) {
  return request.get('/personalized/newsong', data)
}
//根据id获取歌曲信息
export function getSongDetailById(id) {
  return request.get('/song/detail', { ids: id })
}
//根据id获取歌词
export async function getLyric(id) {
  return request.get('/lyric', { id })
}

//获取歌单详情
export async function getPlayListDetail(data?) {
  return request.get('/playlist/detail', data)
}
//获取热门搜索
export async function getSearchHot(data?) {
  return request.get('/search/hot', data)
}
//搜索建议
export async function getSearchSuggest(data?) {
  if (data) {
    data.type = 'mobile'
  }
  return request.get('/search/suggest', data)
}

//搜索歌曲
export async function searchSong(data?) {
  return request.get('/cloudsearch', data)
}